package s.n.bespin.chain;

public class ChainBuilder {

	private Chain chain;

	public ChainBuilder() {
		chain = new Chain();
	}

	public ChainBuilder message(String message) {
		chain.setMessage(message);
		return this;
	}

	public ChainBuilder className(String className) {
		chain.setClassName(className);
		return this;
	}

	public ChainBuilder methodName(String methodName) {
		chain.setMethodName(methodName);
		return this;
	}

	public Chain call() {
		return chain;
	}

	public static class Chain {

		private String message;

		private String className;

		private String methodName;

		public String message() {
			return message;
		}

		private void setMessage(String message) {
			this.message = message;
		}

		public String className() {
			return className;
		}

		private void setClassName(String className) {
			this.className = className;
		}

		public String methodName() {
			return methodName;
		}

		private void setMethodName(String methodName) {
			this.methodName = methodName;
		}
	}
}
